/**
 * Copyright 2014  XCL-Charts
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @Project XCL-Charts
 * @Description Android图表基类库
 * @author XiongChuanLiang<br></br>(xcl_168@aliyun.com)
 * @license http://www.apache.org/licenses/  Apache v2 License
 * @version 1.0
 */
package com.gitee.wsl.common.chart.sample.radar.model

import com.gitee.wsl.common.chart.ChartEnum
import com.gitee.wsl.common.chart.sample.line.model.ValueLineData
import com.gitee.wsl.common.ui.draw.type.DotStyle
import com.gitee.wsl.common.ui.draw.type.LineSpacingStyle


/**
 * @ClassName RadarData
 * @Description  雷达图数据传输基类
 * @author XiongChuanLiang<br></br>(xcl_168@aliyun.com)
 * * MODIFIED    YYYY-MM-DD   REASON
 */
class RadarData : ValueLineData {
    /**
     * 返回雷达图数据当前的填充区域显示风格
     * @return 填充区域显示风格
     */
    /**
     * 设置雷达图数据填充区域显示风格
     * @param style 填满或为空(即只显示线)
     */
    //数据填充区域显示风格
    var areaStyle: ChartEnum.DataAreaStyle = ChartEnum.DataAreaStyle.FILL

    //网格线绘制风格 Solid、Dot、Dash。
    //private var mLineStyle = ChartEnum.LineStyle.SOLID

    constructor() {
        // TODO Auto-generated constructor stub
        plotLine.dotStyle = DotStyle.HIDE
        lineSpacingStyle = LineSpacingStyle.Solid
    }

    /**
     *
     * @param key    key值
     * @param dataSeries 数据序列
     * @param color        线颜色
     * @param areaStyle    区域填充类型
     */
    constructor(
        key: String,
        dataSeries: List<Float>,
        color: Int,
        areaStyle: ChartEnum.DataAreaStyle
    ) {
        label = key
        lineColor = color
        this.linePointList.addAll(dataSeries)
        this.areaStyle = areaStyle
        plotLine.dotStyle = DotStyle.HIDE
    }

}